<%@ page language="java" pageEncoding="UTF-8"%>

<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %>

<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";

 if(request.getAttribute("error")!=null){
	out.println(request.getAttribute("error").toString());
	}
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>insert_how</title>
    <link href="../style/main.css" rel="stylesheet" type="text/css" />
    <link href="../style/ZuCe.css" rel="stylesheet" type="text/css" />
    <link href="../style/table.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
		function checkNull(){
			var nickname = document.forms[0].nickname;
			if(nickname.value==''){
				alert("请输入昵称！");
				nickname.focus();
				return false;
				}
			var bookpswd = document.forms[0].bookpswd;
			if(bookpswd.value==''){
				alert("请输入密码！");
				bookpswd.focus();
				return false;
				}
			}
	</script>
 </head>
  <body style="text-align:center">
		<div class="MainTop"><img src="../images/maintopright.gif" /></div>
	    <div class="MainBar">
	    	<p style="text-indent:2em; text-align:left"> 你现在的位置: > >添加留言</p>
	    </div>
    	<form action="bookAction.do?method=insertBook" method="post" onsubmit="return checkNull();">
			<div id="container">
				<div id="content">
					<table cellspacing="0" cellpadding="0">
						<tr>
							<td style="text-align:right">昵称：</td>
							<td style="text-align:left;"><input name="nickname" type="text" class="InputStyle"/></td>
						</tr>
						<tr>
							<td style="text-align:right">密码：</td>
							<td style="text-align:left;"><input name="bookpswd" type="text" class="InputStyle" /></td>
						</tr>			
						
						<tr>
						  <td colspan="2" style="text-align:left;text-indent:0.5em;">添加留言：</td>
					    </tr>
						<tr>
						  <td colspan="2"><textarea name="book_content" id="textarea" cols="60" rows="5"></textarea></td>
					  </tr>
						<tr>
							<td colspan="2" class="ZuCe"><input type="image" src="../images/tijiao.gif" alt="提交" /></td>
						</tr>			
					</table>
				</div>
			</div>
		</form>
  </body>
</html>
